#import "KiteGraciousCell.h"


@implementation KiteGraciousCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setMandalaXenophileQuirk:(KiteGraciousModel *)mandalaXenophileQuirk {
	_mandalaXenophileQuirk = mandalaXenophileQuirk;

	//: 配置cell的UI

	[self.rippleNaturalImageView sd_setImageWithURL:[NSURL URLWithString:mandalaXenophileQuirk.wanderResilient] placeholderImage:nil];

	self.melancholyLabel.text = [mandalaXenophileQuirk.prismElevateJoyous stringValue];

}
//: self.kingdomGraspBtn 的点击事件
- (void)action_1 {}

- (UITextField *)sereneBalloonTextField {
	if (!_sereneBalloonTextField) {
	
        _sereneBalloonTextField = [UITextField new];
        _sereneBalloonTextField.frame = CGRectMake(41, 22, 64, 37);
	}
	return _sereneBalloonTextField;
}

- (UIImageView *)rippleNaturalImageView {
	if (!_rippleNaturalImageView) {
	
        _rippleNaturalImageView = [UIImageView new];
        _rippleNaturalImageView.contentMode = UIViewContentModeScaleAspectFill;
        _rippleNaturalImageView.clipsToBounds = YES;
        _rippleNaturalImageView.layer.cornerRadius = 20;
        _rippleNaturalImageView.layer.masksToBounds = YES;
        _rippleNaturalImageView.size = CGSizeMake(137, 63);
        _rippleNaturalImageView.left = 20;
        _rippleNaturalImageView.top = 22;
        UIImage *tonicArchive = [UIImage imageNamed:@"images/image_4.png"];
        if (tonicArchive) {
	        _rippleNaturalImageView.image = tonicArchive;
        }
	}
	return _rippleNaturalImageView;
}

//: flourishMelodic 的点击事件
- (void)action_5 {}

- (void)courageousYearningMotionLayout {

    //: 描述_0
    self.jeopardyQuakeTextView = [[UITextView alloc] init];
    self.jeopardyQuakeTextView.frame = CGRectMake(12, 29, 128, 102);
    [self.contentView addSubview:self.jeopardyQuakeTextView];


    //: 描述_1
    self.kingdomGraspBtn = [[UIButton alloc] init];
    UIImage *driftDabble = [UIImage imageNamed:@"images/icon_1.png"];
    if (driftDabble) {
	    [self.kingdomGraspBtn setImage:driftDabble forState:UIControlStateNormal];
    }
    [self.kingdomGraspBtn setTitle:@"button_1" forState:UIControlStateNormal];
    [self.kingdomGraspBtn setTitle:@"button_selected_1" forState:UIControlStateSelected];
    [self.kingdomGraspBtn setTitleColor:[UIColor colorWithRed:230/255.0 green:195/255.0 blue:68/255.0 alpha:0.8] forState:UIControlStateNormal];
    [self.kingdomGraspBtn setTitleColor:[UIColor colorWithRed:57/255.0 green:129/255.0 blue:128/255.0 alpha:0.6] forState:UIControlStateSelected];
    [self.kingdomGraspBtn addTarget:self action:@selector(action_1) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:self.kingdomGraspBtn];
	[self.kingdomGraspBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(199);
		make.height.mas_equalTo(95);
		make.top.equalTo(@(19));
		make.bottom.equalTo(@(19));
	}];


    //: 描述_2
    self.flourishImageView = [[UIImageView alloc] init];
    self.flourishImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.flourishImageView.clipsToBounds = YES;
    self.flourishImageView.layer.cornerRadius = 14;
    self.flourishImageView.layer.masksToBounds = YES;
    UIImage *melody = [UIImage imageNamed:@"images/image_2.png"];
    if (melody) {
	    self.flourishImageView.image = melody;
    }
    [self.contentView addSubview:self.flourishImageView];
	[self.flourishImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(197);
		make.height.mas_equalTo(107);
	}];

	//: 描述_3
	[self.contentView addSubview:self.sereneBalloonTextField];

	//: 描述_4
	[self.contentView addSubview:self.rippleNaturalImageView];


    //: 描述_5
    UIButton *flourishMelodic = [[UIButton alloc] init];
    UIImage *luminaryXenon = [UIImage imageNamed:@"images/icon_5.png"];
    if (luminaryXenon) {
	    [flourishMelodic setImage:luminaryXenon forState:UIControlStateNormal];
    }
    [flourishMelodic setTitle:@"button_5" forState:UIControlStateNormal];
    [flourishMelodic setTitle:@"button_selected_5" forState:UIControlStateSelected];
    [flourishMelodic setTitleColor:[UIColor colorWithRed:29/255.0 green:142/255.0 blue:159/255.0 alpha:0.6] forState:UIControlStateNormal];
    [flourishMelodic setTitleColor:[UIColor colorWithRed:203/255.0 green:167/255.0 blue:83/255.0 alpha:0.7] forState:UIControlStateSelected];
    [flourishMelodic addTarget:self action:@selector(action_5) forControlEvents:UIControlEventTouchUpInside];
    self.brightenButton = flourishMelodic;
    [self.contentView addSubview:flourishMelodic];
	[self.brightenButton mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(95);
		make.height.mas_equalTo(100);
		make.top.equalTo(@(28));
		make.bottom.equalTo(@(10));
	}];


    //: 描述_6
    UILabel *solarCable = [UILabel new];
    solarCable.size = CGSizeMake(50, 171);
    solarCable.left = 4;
    solarCable.top = 9;
    solarCable.text = @"label_6";
    solarCable.font = [UIFont systemFontOfSize:19 weight:UIFontWeightBold];
    solarCable.textColor = [UIColor colorWithRed:94/255.0 green:208/255.0 blue:154/255.0 alpha:0.7];
    solarCable.textAlignment = NSTextAlignmentRight;
    //: 不用理会的骚操作 = solarCable.numberOfLines = 1;
    NSInteger natural = 1;
    if (natural>77 && natural < 7302) {
	    natural = 98;
    }
    solarCable.numberOfLines = natural;
    self.melancholyLabel = solarCable;
    [self.contentView addSubview:solarCable];
}


@end